V = Vue.createApp({
	data(){ return{
		svg: z943,
		hSvg: null,
		mLcd: [	//len 213  
			0,0,0,1,0,0,0,0,1,0,1,0,  //1 col 1-12
			1,0,0,0,1,0,0,0,1,0,0,0,1,  //2 col 13-25
			0, 1,1,1,0,1,1,1, 1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  0, 1, //1 row 26 27-54 55 56
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //2 row 57-84
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //3 row 85-112
			0,0,0,0,1,1,	//.. .. . . 113-118
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //4 row 1-4 119-146
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //4 row 5-8 147-174
			0,1,0,0,	//.... 175-178 
			0,0,0,0,1,0,0,	//%-W 179-185
			0,0,0,0,1,0,0,	//%-var 186-192
			0,0,0,0,1,0,	//%-W 193-198
			0,0,0,0,0, 0,0,0,0,0, //DI-DO 199-208
			0,0,1,0,0 //M K Wh varh com
		],
		mLed: [	//len 120  
			0,0,1, 0,0,	//row 1 ... row 2 . row 3 .
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //1 row 1-4 6-33
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //2 row 4-1 34-61
			1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  1,1,1,0,1,1,1,  //3 row 1-4 62-89
			0,0,1,1,	//row 2 . . row3 . .
			1,0, 0,0,0,0, 0, 0, 1, 1,0,		//a b DI DO K M c e b c a
			1,0,0,0,0,0, 	//row 2 V A var H AL 2
			1,0,0,0,0,0,	//row 1 V A W H AL 1
			1,0,0,0
		],
	}},
	watch:{
		mLcd:{
			handler(n){ V.update(n, V.hSvg.children[3].children) },
			deep: true
		},
		mLed:{
			handler(n){ V.update(n, V.hSvg.children[2].children) },
			deep: true
		}
	},
	methods:{
		update: (d, h) => d.map((i, j) => h[j+1].style.display = i ? '' : 'none'),
		switch: (i='lcd') => V.hSvg.children[3].style.display = i == 'lcd' ? '' : 'none',
		zin: () => {
			let t = parseInt(V.hSvg.getAttribute('width')) * 1.1 + 'px'
			V.hSvg.setAttribute('height', t)
			V.hSvg.setAttribute('width', t)
		},
		zout: () => {
			let t = parseInt(V.hSvg.getAttribute('width')) / 1.1 + 'px'
			V.hSvg.setAttribute('height', t)
			V.hSvg.setAttribute('width', t)
		}
	},
	mounted(){
		this.hSvg = document.getElementById('z943')
		let e = this.hSvg.children
		for(let i=5; i<9; i++){			
			e[i].addEventListener('mousedown', ()=>e[i].style.opacity=0)
			e[i].addEventListener('mouseup', ()=>e[i].style.opacity=1)
		}
		this.update(this.mLcd, e[3].children)
		this.update(this.mLed, e[2].children)
	},
}).mount('#app')